package com.lzy.pattern.adapter.object_adapter;
import lombok.Data;

/**
 * @ClassName: SdAdapterTf
 * @Description: 适配器类
 * @Author: LiuZy
 * @Date: 2022/4/23 09:36
 * @Version: 1.0
 */
public   class  SdAdapterTf implements SdCard {

    private TfCard tfCard;

    public SdAdapterTf(TfCard tfCard){
        this.tfCard = tfCard;
    }

    @Override
    public String read() {
        return tfCard.read();
    }

    @Override
    public void write(String msg) {
        tfCard.write(msg);
    }
}